from urllib.request import Request, urlopen
from urllib.parse import quote

# url = "https://www.baidu.com/s?wd=%E6%B2%88%E7%83%81%E5%8D%8E"
# wd=沈烁华，沈烁华需要进行转码
url = "https://www.baidu.com/s?wd={}".format(quote("沈烁华"))

headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36"
}

request = Request(url, headers=headers)
response = urlopen(request)
print(response.read().decode())
